<!--
*Author：COCO
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/custom/custom/Base_DesktopMenu.js此处编写
 -->
 <template>
  <view-grid ref="grid"
             :columns="columns"
             :detail="detail"
             :editFormFields="editFormFields"
             :editFormOptions="editFormOptions"
             :searchFormFields="searchFormFields"
             :searchFormOptions="searchFormOptions"
             :table="table"
             :extend="extend">
  </view-grid>
</template>
<script>
  import extend from "@/extension/purchasing/purchaserequisition.js";
  import { ref, defineComponent } from "vue";
  export default defineComponent({
      setup() {
          const table = ref({
              key: 'ProcurementRequestId',
              footer: "Foots",
              cnName: '采购管理',
              name: 'purchasing/purchaserequisition',
              url: "/ProcurementRequest/",
              sortName: "ProcurementRequestId"
          });
          const editFormFields = ref({"ProcurementRequestId":"","ProcurementRequestBh":"","ProcurementRequestYlBh":"","ProcurementRequestYlName":"","ProcurementRequestYlNum":"","ProcurementRequestYlXinghao":"","ProcurementRequestYlSize":"","ProcurementRequestYlCreateDate":"","RawmProcurementRequestYlYusuan":"","RawmProcurementRequestYlPc":""});
          
          const editFormOptions = ref([
          [{"title":"采购编号","required":true,"field":"ProcurementRequestBh","type":"text"}],
          [{"title":"采购原料编号","required":true,"field":"ProcurementRequestYlBh","type":"text"}],
          [{"title":"采购原料名称","required":true,"field":"ProcurementRequestYlName","type":"text"}],
          [{"title":"采购原料数量","required":true,"field":"ProcurementRequestYlNum","type":"text"}],
            [{"dataKey":"ProcurementRequestYlXinghaoo","data":[],"title":"采购原料型号","required":true,"field":"ProcurementRequestYlXinghao","type":"select"}],
            [{"dataKey":"ProcurementRequestYlSizee","data":[],"title":"采购原料尺寸","required":true,"field":"ProcurementRequestYlSize","type":"select"}],
            [{field:'ProcurementRequestYlCreateDate',title:'申请时间',type:'datetime',sort:true,width:200,align:'left',sort:true}],
            [{"title":"采购预算","required":true,"field":"RawmProcurementRequestYlYusuan","type":"text"}],
            [{"title":"采购批次号","required":true,"field":"RawmProcurementRequestYlPc","type":"text"}],
                          ]);
          const searchFormFields = ref({"ProcurementRequestId":"","ProcurementRequestBh":"","ProcurementRequestYlBh":"","ProcurementRequestYlName":"","ProcurementRequestYlNum":"","ProcurementRequestYlXinghao":"","ProcurementRequestYlSize":"","ProcurementRequestYlCreateDate":"","RawmProcurementRequestYlYusuan":"","RawmProcurementRequestYlPc":""});
          const searchFormOptions = ref([[{"title":"菜单名称","field":"MenuName","type":"like"}]]);
          const columns = ref([{field:'ProcurementRequestId',title:'采购申请主键',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                     {field:'ProcurementRequestYlBh',title:'采购编号',type:'int',bind:{ key:'MenuList',data:[]},width:80,require:true,align:'left',sort:true},
                     {field:'ProcurementRequestYlBh',title:'采购原料编号',type:'string',link:true,width:120,readonly:true,require:true,align:'left'},
                     {field:'ProcurementRequestYlName',title:'采购原料名称',type:'string',link:true,width:120,readonly:true,require:true,align:'left'},
                     {field:'ProcurementRequestYlNum',title:'采购原料数量',type:'string',link:true,width:120,readonly:true,require:true,align:'left'},
                     {field:'ProcurementRequestYlXinghao',title:'采购原料型号',type:'string',width:120,readonly:true,require:true,align:'left'},
                     {field:'ProcurementRequestYlSize',title:'采购原料尺寸',type:'byte',bind:{ key:'cq',data:[]},width:110,require:true,align:'left'},
                     {field:'ProcurementRequestYlCreateDate',title:'申请时间',type:'datetime',sort:true,width:200,align:'left',sort:true},
                     {field:'RawmProcurementRequestYlYusuan',title:'采购预算',type:'string',width:120,readonly:true,require:true,align:'left'},
                     {field:'RawmProcurementRequestYlPc',title:'采购批次号',type:'string',width:120,readonly:true,require:true,align:'left'},
                   ]);
          const detail = ref({
              cnName: "#detailCnName",
              table: "#detailTable",
              columns: [],
              sortName: "",
              key: ""
          });
          return {
              table,
              extend,
              editFormFields,
              editFormOptions,
              searchFormFields,
              searchFormOptions,
              columns,
              detail,
          };
      },
  });
</script>
